package cn.zzuisa.bluebox.biz.device.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author Ao
 * @since 2019-02-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("g_device_authority_records")
@ApiModel(value="AuthorityRecords对象", description="")
@JsonInclude(Include.NON_NULL)
public class AuthorityRecords extends Model<AuthorityRecords> {

	private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "授权人")
    private Long authorizeer;

    @ApiModelProperty(value = "授权名称")
    private String name;

    @ApiModelProperty(value = "被授权人数组")
    @TableField("authorityPeopleArrays")
    private String authorityPeopleArrays;

    @ApiModelProperty(value = "被授权设备数组")
    @TableField("authorityDeviceArrays")
    private String authorityDeviceArrays;

    @ApiModelProperty(value = "授权类型1蓝牙 2NB")
    private Integer authType;

    @ApiModelProperty(value = "授权时间")
    @TableField("createTime")
    private LocalDateTime createTime;


    @ApiModelProperty(value = "0不限时 1限时")
    @TableField("isLimitExpire")
    private Integer isLimitExpire;

    @ApiModelProperty(value = "若限时 到期时间")
    @TableField("expireTime")
    private LocalDateTime expireTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
